package com.durl.simple.house;

import org.nutz.dao.Dao;
import org.nutz.dao.SqlManager;

import com.durl.simple.URLHouseIniter;

public abstract class DBIniter implements URLHouseIniter {

	protected Dao dao;
	protected SqlManager sqlManager;

	protected DBIniter(Dao dao, SqlManager sqlManager) {
		this.dao = dao;
		this.sqlManager = sqlManager;
	}

	@Override
	public void initTable() {
		if (!this.isTableExist())
			this.createTable();
	}

	abstract boolean isTableExist();

	abstract void createTable();

}
